<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="format-detection" content="telephone=no"/>
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no" />
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>快运快赢</title>
<script src="js/public/mobile-base.js"></script>
<link href="css/lib/mobile-reset.css" rel="stylesheet" type="text/css"/>
<link href="css/lib/idangerous.swiper.css" rel="stylesheet" type="text/css"/>
<link href="css/components/common.css" rel="stylesheet" type="text/css"/>
<link href="css/lib/animate.min.css" rel="stylesheet" type="text/css"/>
<link href="css/pages/index.css" rel="stylesheet" type="text/css"/>
</head>
<body>
    <div class="index-cont">
        <img src="images/index/index_01.jpg" width="100%" alt=""/>
        <img src="images/index/index_02.jpg" width="100%" alt=""/>
        <div class="index-menu">
            <a href="/resources/form-dealer.html" class="index-menu-item">经销商推荐</a>
            <a href="/resources/form-owner.html" class="index-menu-item">车主报名</a>
            <a href="/resources/rule.html" class="index-menu-item">活动规则及获奖</a>
            <a href="/resources/contest-list.html" class="index-menu-item">赛事查询</a>
          </div>
    </div>

    <script src="js/public/zepto.min.js"></script>
    <script src="js/public/idangerous.swiper.min.js"></script>
    <script src="js/public/common.js"></script>
    <script type="text/javascript">
    var hrefUrl = decodeURIComponent(window.location.href),
	 	testReg = /(step=)\d+/,stepText = 0;

	var stepHave = testReg.test(hrefUrl);

	if(stepHave){
		stepText = (hrefUrl.match(testReg))[0].replace('step=','')*1;
	}

    var timer;
	var mySwiper = new Swiper('.swiper-container',{
	mode: 'vertical',
	loop: false,
	initialSlide : stepText ,
	onInit: function(){
		if(stepText = 5){
			var arrImg = $(".wrapper"+(stepText+1)).find('img').not('.arrow');
			$('.arrow').hide();
	       	arrImg.eq(0).addClass('animated fadeInDown');
	       	arrImg.eq(2).addClass('animated fadeInUp');
	       	setTimeout(function(){
	           arrImg.eq(1).addClass('animated swing');
	       	}, 600)
		}
	},
	onTouchMove: function(swiper){
			$('.arrow').hide();
		 },
	onTouchEnd: function(swiper){
		$('.arrow').show().attr({'src':'images/index/arrow-down.png','class':'arrow fadeInDown animated infinite'})
		var slideIndex = swiper.activeLoopIndex+1;
	             var arrImg = $(".wrapper"+slideIndex).find('img').not('.arrow');
                        	arrImg.attr("class","");
                        	if(timer) clearTimeout(timer);
                        	timer = setTimeout(function(){
                        	switch(slideIndex){
                                      case 1:
                                                   arrImg.eq(0).addClass('rollIn animated');
                                                   arrImg.eq(1).addClass('zoomIn animated');
                                                   arrImg.eq(3).addClass('animated fadeInDown');
                                                   setTimeout(function(){
                                                       arrImg.eq(2).addClass('animated swing');
                                                   }, 600);
                                                   break;
                                      case 2:
                                                   arrImg.eq(0).addClass('animated fadeInLeft');
                                                   arrImg.eq(1).addClass('animated fadeInRight');
                                                   arrImg.eq(2).addClass('animated lightSpeedIn');
                                                   arrImg.eq(3).addClass('animated zoomIn');
                                                   arrImg.eq(4).addClass('animated rotateInUpLeft');
                                                   arrImg.eq(5).addClass('animated fadeInRight');
                                                   break;
                                      case 3:
			                                      arrImg.eq(0).addClass('animated fadeInLeft');
			                                      arrImg.eq(1).addClass('animated fadeInRight');
			                                      arrImg.eq(2).addClass('animated lightSpeedIn');
			                                      arrImg.eq(3).addClass('animated fadeInLeft');
			                                      break;
                                      case 4:
                                                   arrImg.eq(0).addClass('animated fadeInRight');
                                                   arrImg.eq(1).addClass('animated fadeInLeft');
                                                   arrImg.eq(2).addClass('animated lightSpeedIn');
                                                   arrImg.eq(3).addClass('animated fadeInRight');
                                                   break;
                                      case 5:
                                                   /*arrImg.eq(0).addClass('animated fadeInDown');
                                                   arrImg.eq(1).addClass('animated fadeInDown');
                                                   arrImg.eq(2).addClass('animated fadeInDown');
                                                   arrImg.eq(3).addClass('animated fadeInUp');
                                                   arrImg.eq(4).addClass('animated fadeInRight');*/
                                                   arrImg.eq(0).addClass('animated fadeInUp');
                                                   arrImg.eq(1).addClass('animated fadeInDown');
                                                   break;
                                      case 6:

                                      			$('.arrow').hide();
                                                   arrImg.eq(0).addClass('animated fadeInDown');
                                                   arrImg.eq(2).addClass('animated fadeInUp');
                                                   setTimeout(function(){
                                                       arrImg.eq(1).addClass('animated swing');
                                                   }, 600)
                                                   break;
                                        }

                                },100);

							}
            });
</script>
</body>
</html>